package com.jrx.anytxn.param.dto.aviator;


import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * @author Aning
 * @date 2018-11-09
 */
public class RuleReq implements Serializable {

    private static final long serialVersionUID = -4261039723164833795L;
    /**
     * 规则ID
     * 表字段:id
     */
    @ApiModelProperty(value = "编号", example = "1")
    private Long id;

    /**
     * 租戶id
     * 表字段:tenant_id
     */
    private String tenantId;

    /**
     * 规则名
     * 表字段:rule_name
     */
    @ApiModelProperty(value = "规则名", example = "***规则")
    private String ruleName;

    /**
     * 规则描述
     * 表字段:rule_description
     */
    @ApiModelProperty(value = "规则描述", example = "用于获取***")
    private String ruleDescription;
    /**
     * 规则优先级
     * 表字段:RULE_PRIORITY
     */
    @ApiModelProperty(value = "规则优先级", example = "1")
    private String rulePriority;

    /**
     * 机构号
     * 表字段:ORGANIZATION_NUMBER
     */
    @ApiModelProperty(value = "机构号", example = "0001")
    private String organizationNumber;

    /**
     * 产品ID
     * 表字段:PRODUCT_NUMBER
     */
    @ApiModelProperty(value = "产品号", example = "P88888")
    private String productNumber;

    /**
     * 创建人员
     * 表字段:create_by
     */
    private String createBy;

    /**
     * 创建时间
     * 表字段:create_time
     */
    private Date createTime;

    /**
     * 更新时间
     * 表字段:update_time
     */
    private Date updateTime;

    /**
     * 更新人员
     * 表字段:update_by
     */
    private String updateBy;

    /**
     * 规则类型
     * 表字段:rule_type
     */
    @ApiModelProperty(value = "规则类型",example = "min_repayment_rule")
    private String ruleType;

    /**
     * 规则条件
     * 表字段:rule_conditions
     */
    private String ruleConditions;

    /**
     * 规则结果
     * 表字段:rule_result
     */
    private String ruleResult;

    /**
     * 规则结果
     * 提供给前端使用的
     */
    private Map ruleResultMap;

    /**
     * 条件
     * 提供给前端使用的
     */
    private ConditionGroupReq conditionGroup;


    /**
     * 表达式
     */
    @ApiModelProperty(value = "基于条件组结构的表达式", example = "a < 10 && b > 2")
    private String expression;

    private String[] expField;
    private String[] expValueType;
    private String[] expDefaultValue;

    /**
     * 规则状态 1-有效 0无效
     */
    @ApiModelProperty(value = "规则状态", example = "1")
    private String ruleStatus;

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }


    /**
     * 获取规则ID
     *
     * @return id BigDecimal
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置规则ID
     *
     * @param id 规则ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取规则名
     *
     * @return ruleName String
     */
    public String getRuleName() {
        return ruleName;
    }

    /**
     * 设置规则名
     *
     * @param ruleName 规则名
     */
    public void setRuleName(String ruleName) {
        this.ruleName = ruleName == null ? null : ruleName.trim();
    }

    /**
     * 获取规则描述
     *
     * @return ruleDescription String
     */
    public String getRuleDescription() {
        return ruleDescription;
    }

    /**
     * 设置规则描述
     *
     * @param ruleDescription 规则描述
     */
    public void setRuleDescription(String ruleDescription) {
        this.ruleDescription = ruleDescription == null ? null : ruleDescription.trim();
    }

    /**
     * 获取创建人员
     *
     * @return createBy String
     */
    public String getCreateBy() {
        return createBy;
    }

    public String getRulePriority() {
        return rulePriority;
    }

    public void setRulePriority(String rulePriority) {
        this.rulePriority = rulePriority;
    }

    public String getOrganizationNumber() {
        return organizationNumber;
    }

    public void setOrganizationNumber(String organizationNumber) {
        this.organizationNumber = organizationNumber;
    }

    public String getProductNumber() {
        return productNumber;
    }

    public void setProductNumber(String productNumber) {
        this.productNumber = productNumber;
    }

    public String[] getExpField() {
        return expField;
    }

    public void setExpField(String[] expField) {
        this.expField = expField;
    }

    public String[] getExpValueType() {
        return expValueType;
    }

    public void setExpValueType(String[] expValueType) {
        this.expValueType = expValueType;
    }

    public String[] getExpDefaultValue() {
        return expDefaultValue;
    }

    public void setExpDefaultValue(String[] expDefaultValue) {
        this.expDefaultValue = expDefaultValue;
    }

    /**
     * 设置创建人员
     *
     * @param createBy 创建人员
     */
    public void setCreateBy(String createBy) {
        this.createBy = createBy == null ? null : createBy.trim();
    }

    /**
     * 获取创建时间
     *
     * @return createTime LocalDateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取更新时间
     *
     * @return updateTime LocalDateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置更新时间
     *
     * @param updateTime 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取更新人员
     *
     * @return updateBy String
     */
    public String getUpdateBy() {
        return updateBy;
    }

    /**
     * 设置更新人员
     *
     * @param updateBy 更新人员
     */
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    /**
     * 获取规则类型
     *
     * @return ruleType String
     */
    public String getRuleType() {
        return ruleType;
    }

    /**
     * 设置规则类型
     *
     * @param ruleType 规则类型
     */
    public void setRuleType(String ruleType) {
        this.ruleType = ruleType == null ? null : ruleType.trim();
    }

    public String getRuleStatus() {
        return ruleStatus;
    }

    public void setRuleStatus(String ruleStatus) {
        this.ruleStatus = ruleStatus;
    }

    /**
     * 获取规则条件
     *
     * @return ruleConditions String
     */
    public String getRuleConditions() {

        return ruleConditions;
    }

    /**
     * 设置规则条件
     *
     * @param ruleConditions 规则条件
     */
    public void setRuleConditions(String ruleConditions) {
        this.ruleConditions = ruleConditions == null ? null : ruleConditions.trim();
    }

    /**
     * 获取规则结果
     *
     * @return ruleResult String
     */
    public String getRuleResult() {
        return ruleResult;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /**
     * 设置规则结果
     *
     * @param ruleResult 规则结果
     */
    public void setRuleResult(String ruleResult) {
        this.ruleResult = ruleResult == null ? null : ruleResult.trim();
    }

    public ConditionGroupReq getConditionGroup() {
        return conditionGroup;
    }

    public void setConditionGroup(ConditionGroupReq conditionGroup) {
        this.conditionGroup = conditionGroup;
    }

    public Map getRuleResultMap() {
        return ruleResultMap;
    }

    public void setRuleResultMap(Map ruleResultMap) {
        this.ruleResultMap = ruleResultMap;
    }
}
